@import '../../variables.scss';
@import '../../reset.scss';

@keyframes updown {
  0% {
    transform: translateY(10px);
  }

  0% {
    transform: translateY(-10px);
  }
}

@keyframes rotate-circle {
  100% {
    transform: rotate(360deg);
  }
}

.home-page {
  .top-section {
    height: 720px;
    background-color: $brandColor;
    .top-body {
      position: relative;
      overflow: hidden;
      height: 100%;
      max-width: $contentWidth;
      margin: 0 auto;
    }
    .vertical-middle {
      position: absolute;
      left: 0;
      top: 50%;
      transform: translateY(-50%);
      box-sizing: border-box;
      width: 50%;
      z-index: 5;
    }
    .product-name {
      position: relative;
      display: inline-block;
      h2 {
        font-family: Avenir-Medium;
        font-weight: 700;
        font-size: 46px;
        color: #FFF;
        word-break: break-word;
        margin: 0;
      }
    }
    .product-desc {
      font-family: Avenir-Medium;
      font-size: 24px;
      color: #FFF;
      margin: 12px auto 0;
      max-width: 730px;
    }
    .button-area {
      margin-top: 40px;
      .button {
        margin-right: 20px;
        margin-bottom: 10px;
      }
      .button:last-child {
        margin-right: 0;
      }
      @media screen and (max-width: 320px){
        .button {
          margin-right: 1px;
        }
      }
    }
    .github-buttons {
      margin-top: 10px;
      a {
        margin-right: 20px;
        &:last-child {
          margin-right: 0;
        }
        div {
          border-radius: 2px;
          display: inline-block;
          height: 24px;
          line-height: 24px;
          padding-left: 10px;
          color: #fff;
          font-size: 0;
          background: rgba(255, 255, 255, 0.2);
          img {
            width: 16px;
            height: 16px;
            vertical-align: middle;
          }
          .type {
            font-size: 16px;
            padding: 0 8px 0 4px;
            vertical-align: middle;
          }
          .line {
            vertical-align: middle;
            display: inline-block;
            box-sizing: border-box;
            width: 1px;
            height: 12px;
            border-left: 1px solid rgba(255, 255, 255, 0.2);
          }
          .count {
            vertical-align: middle;
            font-size: 16px;
            padding: 0 8px;
          }
        }
      }
    }
    .animation {
      width: 546px;
      height: 578px;
      position: absolute;
      top: 146px;
      right: 0;
      img {
        position: absolute;
      }
      .img1 {
        width: 351px;
        height: 156px;
        left: calc(50% - 175px);
        top: 0;
        animation: updown 2s ease-in-out infinite alternate;
      }
      .img2 {
        width: 457px;
        height: 578px;
        left: 50%;
        transform: translateX(-50%);
        top: 0;
        z-index: 2;
      }
      .img3 {
        width: 457px;
        height: 578px;
        left: 50%;
        transform: translateX(-50%);
        top: 0;
        z-index: 1;
      }
      .img4 {
        width: 93px;
        height: 39px;
        left: 0;
        bottom: 88px;
        animation: updown 2s ease-in-out infinite alternate;
      }
      .img5 {
        width: 93px;
        height: 39px;
        right: 0;
        bottom: 129px;
        animation: updown 2s ease-in-out infinite alternate; 
      }
      .outer-circle {
        opacity: 0.1;
        border: 2px solid #11BAFA;
        width: 512px;
        height: 208px;
        border-radius: 50%;
        position: absolute;
        z-index: 1;
        left: 50%;
        transform: translateX(-50%);
        bottom: 145px;
      }
      .rotate-circle {
        position: absolute;
        left: calc(50% - 202px);
        top: 126px;
        width: 404px;
        height: 404px;
        transform: rotateX(66deg);
        svg {
          animation: rotate-circle 1.2s linear infinite;
        }
      }
    }
    @media screen and (max-width: 768px) {
      .vertical-middle {
        text-align: center;
        width: 100%;
      }
      .animation {
        display: none;
      }
    }
  }
  .introduction-section {
    background: #FFF;
    .introduction-body {
      max-width: $contentWidth;
      box-sizing: border-box;
      margin: 0 auto;
      min-height: 640px;
      padding: 0 40px;
      position: relative;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      .introduction {
        display: inline-block;
        width: calc(100% - 530px);
        min-width: 300px;
        max-width: 590px;
        h3 {
          font-family: Avenir-Medium;
          font-weight: 700;
          font-size: 36px;
          color: #333;
          margin-bottom: 20px;
          word-break: break-word;
        }
        p {
          opacity: 0.56;
          font-family: Avenir-Medium;
          font-size: 18px;
          color: #999;
        }
        ul {
          list-style: none;
          margin-top: 25px;
          li {
            position: relative;
            margin-bottom: 25px;
            &:last-child {
              margin-bottom: 0;
            }
          }
          li::before {
            content: '';
            position: absolute;
            left: 0;
            top: 10px;
            width: 6px;
            height: 6px;
            background: #999;
            border-radius: 50%;
          }
          p {
            display: inline-block;
            margin-left: 12px;
          }
        }
      }
      img {
        width: 530px;
        // margin: 0 82px;
        max-width: 100%;
        box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.05);
      }
      @media screen and (max-width: 1106px){
        .introduction {
          display: inline-block;
          width: 100%;
          max-width: 100%; 
        }
        img {
          margin: 0;
        }
      }
    }
  }
  .feature-section {
    background: #F9FAFA;
    .feature-container {
      box-sizing: border-box;
      max-width: $contentWidth;
      margin: 0 auto;
      position: relative;
      padding: 80px 40px 40px;
      h3 {
        font-family: Avenir-Medium;
        font-weight: 700;
        font-size: 36px;
        color: #333;
        text-align: center;
        margin: 0 0 60px;
      }
      ul {
        list-style: none;
        padding: 0;
        margin: 0;
        li {
          vertical-align: top;
          display: inline-block;
          margin-bottom: 40px;
          width: 50%;
          .docsite-icon {
            vertical-align: top;
            margin-right: 20px;
            &::before {
              vertical-align: top;
            }
          }
          div {
            display: inline-block;
            width: 80%;
            h4 {
              font-family: Avenir-Medium;
              font-weight: 700;
              font-size: 20px;
              color: #333;
              margin: 10px 0 20px;
            }
            p {
              font-family: Avenir-Medium;
              font-size: 14px;
              line-height: 20px;
              color: #999;
            }
          }
        }
        @media screen and (max-width: 768px){
          li {
            width: 100%;
          }
        }
      }
    }
  }
  .footer-container {
    background: #fff;
  }
  @media screen and (max-width: $mobileWidth) {
    .introduction-section {
      padding: 0 20px;
      &::before {
        left: 20px;
      }
      &::after {
        left: 19px;
      }
    }
    .feature-container {
      padding-left: 20px;
      padding-right: 20px;
    }
  }
}